package com.hertz.alarm.controller.api;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hertz.alarm.controller.BaseController;
import com.hertz.alarm.controller.support.ResultModel;
import com.hertz.alarm.entity.Team;
import com.hertz.alarm.service.TeamNbaService;
import com.hertz.alarm.util.ReturnCodeConstants;

@RequestMapping("/api/nbateam")
@Controller
public class ApiTeamController extends BaseController{
	@Resource
	private TeamNbaService teamNbaService;
	@RequestMapping(value="get",method=RequestMethod.GET)
	public @ResponseBody
	ResultModel<Object> getTeamNba(
			@RequestParam(value = "id", required = true) Short id) {
		Team team = teamNbaService.getTeam(id);
		ResultModel<Object> result = buildResultModel(team, ReturnCodeConstants.SUCCESS);
		return result;
	}

}
